package org.ichamigua.user.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.ichihamigua.common.user.entity.UserUpdateAvatarLogEntity;
import org.ichihamigua.common.user.entity.UserUpdateUsernameLogEntity;

/**
 * @author zzy
 */
@Mapper
public interface UserUpdateUsernameLogMapper extends BaseMapper<UserUpdateUsernameLogEntity> {
    @Select("SELECT COUNT(*) AS count FROM ic_user_update_username_log as log join ic_user as u on log.userId = u.id WHERE u.id = 'userId' AND YEAR(time) = YEAR(CURRENT_DATE)")
    int selectUsernameByUserIds();
}
